package com.jj.service;

import com.jj.pojo.User;
import com.jj.util.ThreadLocalContext;
import com.sun.istack.internal.NotNull;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

@Service
@RequiredArgsConstructor
public class DemoService {


    private @NotNull DemoService001 demoService001;


    public String demo(String str) {
        System.out.println("DemoService:" + Thread.currentThread().getId());

        User initUser = (User) ThreadLocalContext.get("initUser");
        System.out.println(initUser.toString());

        initUser.setUserName("张三1");
        str += demoService001.doService001("dadwa");
        return str + ",hello";
    }
}
